import Crypto from '@/common/utils/crypto1/crypto/crypto.js';
import '@/common/utils/crypto1/hmac/hmac.js';
import '@/common/utils/crypto1/sha1/sha1.js';
import {
	Base64
} from '@/common/utils/base64.js';
var uploadFileSize = 1024 * 1024 * 100; // 上传文件的大小限制100m
var policyText = {
	"expiration": "2030-01-01T12:00:00.000Z", //设置该Policy的失效时间，超过这个失效时间之后，就没有办法通过这个policy上传文件了
	"conditions": [{
			"bucket": "zjmeifeng"
		},
		["starts-with", "$key", "test1/"]
	],
};

export var ossAccessid = 'LTAI5tFZdCKybTxQmG5pWGhN';
export var ossAccesskey = 'YYkVHYcmlZlOKfbCcJ8PVAeQcDivrP';
export var ossHost = 'http://zjmeifeng.oss-cn-beijing.aliyuncs.com';
export var ossPolicyBase64 = Base64.encode(JSON.stringify(policyText));
export var message = ossPolicyBase64;
export var bytes = Crypto.HMAC(Crypto.SHA1, message, ossAccesskey, {
	asBytes: true
});
export var ossSignature = Crypto.util.bytesToBase64(bytes);
export var ossOnePath = "test1/"

// 引入方式:
// import {ossAccessid,ossHost,ossSignature,ossPolicyBase64} from "@/common/ossUploadfile.js"